package org.example.javaee_demo1.service;


import org.example.javaee_demo1.Mapper.UserMapper;
import org.example.javaee_demo1.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    UserMapper userMapper;


    public boolean isexistname(String username,String password) {
       return userMapper.isexistname(username,password);

    }

    public List<User> getUser() {
        return userMapper.getUser();
    }

    public boolean addUser(User user) {
        return userMapper.addUser(user);
    }

    public boolean deleteUser(Integer id) {
        return userMapper.deleteUser(id);
    }

    public boolean updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
